package cn.edu.scau.cmi.suyaoxing.simpleFactory;
import cn.edu.scau.cmi.suyaoxing.factory.*;

public class InsuranceFactory {
	public static Insurance getInstance(int num) {
		Insurance insurance=null;
		switch(num) {
		case 0:
			insurance=new BodyInjure();break;
		case 1:
			insurance=new Collision();break;
		case 2:
			insurance=new PersonInjure();break;
		case 3:
			insurance=new Com();break;
	    default:System.out.println("请选择具体的保险类型");
		}
		return insurance;
	}
}
